<template>
  <div class="dashboard-container">
    <!-- 欢迎横幅 -->
    <WelcomeBanner :pending-count="0" />
  </div>
</template>

<script setup lang="ts">
import WelcomeBanner from '@/views/dashboard/components/welcome-banner.vue';
</script>

<style scoped lang="less">
.dashboard-container {
  padding: 20px;
  min-height: calc(100vh - 200px);
}

.dashboard-section {
  margin-bottom: 24px;
  background: var(--color-bg-1);
  border: 1px solid var(--color-border-1);
  border-radius: 12px;
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-1);
  background: var(--color-fill-1);
}

.section-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-1);

  .arco-icon {
    font-size: 18px;
    color: rgb(var(--primary-6));
  }
}

.title-badge {
  margin-left: 8px;
}

.section-content {
  padding: 20px;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--color-text-3);
}

.applications-list {
  .application-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border-2);

    &:last-child {
      border-bottom: none;
    }
  }

  .application-info {
    flex: 1;
    min-width: 0;
  }

  .application-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }

  .user-details {
    flex: 1;
  }

  .user-name {
    font-weight: 500;
    color: var(--color-text-1);
    margin-bottom: 4px;
  }

  .application-time {
    font-size: 12px;
    color: var(--color-text-3);
  }

  .application-content {
    margin-left: 44px;
    color: var(--color-text-2);
    font-size: 14px;
    line-height: 1.5;

    .application-reason,
    .application-contact {
      margin-bottom: 4px;
    }
  }

  .application-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 16px;
  }
}

.view-more {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-2);
}

.notice-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.notice-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;

  &--info {
    background: rgb(var(--primary-1));
    color: rgb(var(--primary-6));
  }

  &--success {
    background: rgb(var(--success-1));
    color: rgb(var(--success-6));
  }

  &--warning {
    background: rgb(var(--warning-1));
    color: rgb(var(--warning-6));
  }

  &--error {
    background: rgb(var(--danger-1));
    color: rgb(var(--danger-6));
  }
}

.notice-content {
  flex: 1;
  min-width: 0;
}

.notice-title {
  font-size: 14px;
  color: var(--color-text-1);
  margin-bottom: 4px;
  line-height: 1.4;
}

.notice-time {
  font-size: 12px;
  color: var(--color-text-3);
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-action-btn {
  justify-content: flex-start;
  height: 48px;

  :deep(.arco-btn-icon) {
    margin-right: 12px;
    font-size: 18px;
  }
}

// 响应式设计
@media (max-width: 768px) {
  .dashboard-container {
    padding: 16px;
  }

  .section-content {
    padding: 16px;
  }

  .application-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .application-actions {
    margin-left: 0;
    justify-content: flex-end;
  }

  .application-content {
    margin-left: 0;
  }
}
</style>
